package XB;

import java.util.Scanner;

public class Laboratory {
    String room;
    String[] degree={"无","无","无","无","无"};
    public Laboratory(String room){
        this.room=room;
    }
    public void shengcheng(Student student1,Student student2,int c3,String[] a1,String[] a2,String[] a3) {
        int i;
        while (c3 == 1) {
            if (student1.task1 != "无") {
                System.out.println("计算机网络实验室每周打扫程度随机生成");
                for(i=0;i<5;i++)
                {double v=Math.random();
                    if(v>0.6){
                        a1[i]="优";
                    }
                    if(v>0.3&&v<=0.6){
                        a1[i]="良";
                    }
                    if(v>=0&&v<=0.3){
                        a1[i]="及格";
                    }
                }

            }
            if (student1.task2 != "无") {
                System.out.println("组成原理实验室每周打扫程度随机生成");
                for(i=0;i<5;i++)
                {double v=Math.random();
                    if(v>0.6){
                        a2[i]="优";
                    }
                    if(v>0.3&&v<=0.6){
                        a2[i]="良";
                    }
                    if(v>=0&&v<=0.3){
                        a2[i]="及格";
                    }
                }
            }
            if (student1.task3 != "无") {
                System.out.println("大学物理实验室每周打扫程度随机生成");
                for(i=0;i<5;i++)
                {double v=Math.random();
                    if(v>0.6){
                        a3[i]="优";
                    }
                    if(v>0.3&&v<=0.6){
                        a3[i]="良";
                    }
                    if(v>=0&&v<=0.3){
                        a3[i]="及格";
                    }
                }
            }
            System.out.println("按1返回上一级");
            Scanner input5 = new Scanner(System.in);
            int c5 = input5.nextInt();
            if(c5==1){
                break;
            }
        }
            while (c3 == 2) {
                if (student2.task1 != "无") {
                    System.out.println("计算机网络实验室每周打扫程度随机生成");
                    for(i=0;i<5;i++)
                    {double v=Math.random();
                        if(v>0.6){
                            a1[i]="优";
                        }
                        if(v>0.3&&v<=0.6){
                            a1[i]="良";
                        }
                        if(v>=0&&v<=0.3){
                            a1[i]="及格";
                        }
                }}
                if (student2.task2 != "无") {
                    System.out.println("组成原理实验室每周打扫程度随机生成");
                    for(i=0;i<5;i++)
                    {double v=Math.random();
                        if(v>0.6){
                            a2[i]="优";
                        }
                        if(v>0.3&&v<=0.6){
                            a2[i]="良";
                        }
                        if(v>=0&&v<=0.3){
                            a2[i]="及格";
                        }
                    }
                }
                if (student2.task3 != "无") {
                    System.out.println("大学物理实验室每周打扫程度随机生成");
                    for(i=0;i<5;i++) {
                        double v = Math.random();
                        if (v > 0.6) {
                            a3[i] = "优";
                        }
                        if (v > 0.3 && v <= 0.6) {
                            a3[i] = "良";
                        }
                        if (v >= 0 && v <= 0.3) {
                            a3[i] = "及格";
                        }
                    }
                }
                System.out.println("按1返回上一级");
                Scanner input5 = new Scanner(System.in);
                int c5 = input5.nextInt();
                if(c5==1){
                    break;
                }
            }
    }}
